home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / ubuntu-docs / ubuntu / sample / posfix_commands.sh next >
Encoding:
Text File  |  2009-04-28  |  1.4 KB  |  32 lines

  1. postconf -e 'smtpd_sasl_local_domain ='
  2. postconf -e 'smtpd_sasl_auth_enable = yes'
  3. postconf -e 'smtpd_sasl_security_options = noanonymous'
  4. postconf -e 'broken_sasl_auth_clients = yes'
  5. postconf -e 'smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination'
  6. postconf -e 'inet_interfaces = all'
  7. echo 'pwcheck_method: saslauthd' >> /etc/postfix/sasl/smtpd.conf
  8. echo 'mech_list: plain login' >> /etc/postfix/sasl/smtpd.conf
  9.  
  10. mkdir /etc/postfix/ssl
  11. cd /etc/postfix/ssl/
  12. openssl genrsa -des3 -rand /etc/hosts -out smtpd.key 1024
  13. chmod 600 smtpd.key
  14. openssl req -new -key smtpd.key -out smtpd.csr
  15. openssl x509 -req -days 3650 -in smtpd.csr -signkey smtpd.key -out smtpd.crt
  16. openssl rsa -in smtpd.key -out smtpd.key.unencrypted
  17. mv -f smtpd.key.unencrypted smtpd.key
  18. openssl req -new -x509 -extensions v3_ca -keyout cakey.pem -out cacert.pem -days 3650
  19.  
  20. postconf -e 'smtpd_tls_auth_only = no'
  21. postconf -e 'smtp_use_tls = yes'
  22. postconf -e 'smtpd_use_tls = yes'
  23. postconf -e 'smtp_tls_note_starttls_offer = yes'
  24. postconf -e 'smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key'
  25. postconf -e 'smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt'
  26. postconf -e 'smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem'
  27. postconf -e 'smtpd_tls_loglevel = 1'
  28. postconf -e 'smtpd_tls_received_header = yes'
  29. postconf -e 'smtpd_tls_session_cache_timeout = 3600s'
  30. postconf -e 'tls_random_source = dev:/dev/urandom'
  31. postconf -e 'myhostname = mail.example.com'
  32.